<%@ page contentType="text/html; charset=Windows-31J" language="java" %>
<%@ include file="../inc/common.jsp" %>
<html:html locale="true">
<HEAD>
	<html:base/>
	<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
	<TITLE><%=Globals.get("WEB_PAGETITLE")%></TITLE>
<SCRIPT language="JavaScript" >
	function openAdd() {
		<bean:define id="projectId" name="DoWeeklyReportActionForm" property="projectId" type="java.lang.Integer" />
		var win1 = window.open("weeklyReport_add_workItem.do?projectId=<%=projectId%>", "selector", "width=450, height=600, scrollbars=yes");
	}
</SCRIPT>
</HEAD>
<BODY BGCOLOR=<%=Globals.get("WEB_BODY_BGCOLOR")%> LINK=<%=Globals.get("WEB_BODY_LINK")%> VLINK=<%=Globals.get("WEB_BODY_VLINK")%>>
<html:form action="/weeklyReport_add_confirm" target="sub">
<CENTER>
<BR><H4>
週報登録画面
<logic:greaterThan name="DoWeeklyReportActionForm" property="weeklyReportId" value="0">
<font color=FF0000>（訂正）</font>
</logic:greaterThan>
</H4><HR><BR>
</CENTER>
<html:hidden name="DoWeeklyReportActionForm" property="weeklyReportId" />
<html:hidden name="DoWeeklyReportActionForm" property="projectId" />
<TABLE cellpadding="1" cellspacing="1" border="1">
<TR>
	<TH ALIGN="left">ﾌﾟﾛｼﾞｪｸﾄ名</TH>
	<TD><bean:write name="project" property="name" /></TD>
</TR>
<TR>
	<TH ALIGN="left">ﾌﾟﾛｼﾞｪｸﾄﾘｰﾀﾞｰ</TH>
	<TD><bean:write name="pLStaff" property="name" /></TD>
</TR>
<TR>
	<TH ALIGN="left">期間</TH>
	<TD>
		<bean:write name="project" property="periodStartY" />年
		<bean:write name="project" property="periodStartM" />月
		<bean:write name="project" property="periodStartD" />日 ～ 
		<bean:write name="project" property="periodEndY" />年
		<bean:write name="project" property="periodEndM" />月
		<bean:write name="project" property="periodEndD" />日
	</TD>
</TR>
<TR>
	<TH ALIGN="left">ﾌﾟﾛｼﾞｪｸﾄ概要</TH>
	<TD><pre><bean:write name="project" property="outline" /></pre></TD>
</TR>
<TR>
	<TH ALIGN="left">作業</TH>
	<TD>
		<bean:write name="DoWeeklyReportActionForm" property="workDateStartY" />年
		<bean:write name="DoWeeklyReportActionForm" property="workDateStartM" />月
		<bean:write name="DoWeeklyReportActionForm" property="workDateStartD" />日 ～ 
		<bean:write name="DoWeeklyReportActionForm" property="workDateEndY" />年
		<bean:write name="DoWeeklyReportActionForm" property="workDateEndM" />月
		<bean:write name="DoWeeklyReportActionForm" property="workDateEndD" />日
	</TD>
</TR>
<html:hidden property="workDateStartY" />
<html:hidden property="workDateStartM" />
<html:hidden property="workDateStartD" />
<html:hidden property="workDateEndY" />
<html:hidden property="workDateEndM" />
<html:hidden property="workDateEndD" />
</TABLE><BR>


<B>取引先体制：</B>
<TABLE border="1">
<TR>
	<TH>ﾌﾟﾛｼﾞｪｸﾄﾒﾝﾊﾞｰ</TH>
</TR>
<TR>
	<TD><pre><bean:write name="project" property="pjCustomerStaff" /></pre></TD>
</TR>
</TABLE><BR>


<B>ﾊｳ内体制：</B>
<TABLE border="1">
<TR>
	<TH>ﾌﾟﾛｼﾞｪｸﾄﾒﾝﾊﾞｰ</TH>
</TR>
<logic:iterate id="staffList" name="staffList">
<TR>
	<TD>
		<bean:write name="staffList" property="name" />
	</TD>
</TR>
</logic:iterate>
</TABLE><BR>

<B>●線表</B>
<html:submit property="add" value="追加" onclick="openAdd()" /><br>
<TABLE border="1">
<TR>
	<TH>項目</TH>
	<TH>期日</TH>
	<TH>日報小計</TH>
	<TH>稼働時間</TH>
</TR>

<logic:iterate id="workItemList" name="workItemList" indexId="index" scope="session">
<logic:equal name="workItemList" property="addStaffId" value="0">
<TR>
	<TD>
		<bean:write name="workItemList" property="name" />
	</TD>
	<TD>
		<html:select name="workItemList" property="deadlineY" indexed="true">
			<html:options name="systemCalendar" property="systemYear" labelProperty="systemYear" labelName="systemCalendar" />
		</html:select>年
		<html:select name="workItemList" property="deadlineM" indexed="true">
			<html:options name="systemCalendar" property="systemMonth" labelProperty="systemMonth" labelName="systemCalendar" />
		</html:select>月
		<html:select name="workItemList" property="deadlineD" indexed="true">
			<html:options name="systemCalendar" property="systemDate" labelProperty="systemDate" labelName="systemCalendar" />
		</html:select>日
	</TD>
<%String workingHours = "workingHours" + index;%>
<logic:iterate id="weeklyReportWorkItem" name="weeklyReportWorkItem" offset="index" length="1" scope="session">
	<TD ALIGN="right">
		<bean:write name="weeklyReportWorkItem" property="workingHours" /> h
	</TD>
	<TD>
		<html:text name="weeklyReportWorkItem" property="workingHours" size="6" indexed="true" /> h
		<html:errors property="<%=workingHours%>" />
	</TD>
</logic:iterate>
</TR>
</logic:equal>
</logic:iterate>


<logic:iterate id="addWorkItemList" name="addWorkItemList" indexId="index" scope="session" >
<TR>
	<TD>
		<bean:write name="addWorkItemList" property="name" />
	</TD>
	<TD>
		<html:select name="addWorkItemList" property="deadlineY" indexed="true">
			<html:options name="systemCalendar" property="systemYear" labelProperty="systemYear" labelName="systemCalendar" />
		</html:select>年
		<html:select name="addWorkItemList" property="deadlineM" indexed="true">
			<html:options name="systemCalendar" property="systemMonth" labelProperty="systemMonth" labelName="systemCalendar" />
		</html:select>月
		<html:select name="addWorkItemList" property="deadlineD" indexed="true">
			<html:options name="systemCalendar" property="systemDate" labelProperty="systemDate" labelName="systemCalendar" />
		</html:select>日
	</TD>
<%String addWorkingHours = "addWorkingHours" + index;%>
<logic:iterate id="addWeeklyReportWorkItemList1" name="addWeeklyReportWorkItemList" offset="index" length="1" scope="session">
	<TD ALIGN="right">
		<bean:write name="addWeeklyReportWorkItemList1" property="workingHours" /> h
	</TD>
	<TD>
		<html:text name="addWeeklyReportWorkItemList1" property="workingHours" size="6" indexed="true" /> h
		<html:errors property="<%=addWorkingHours%>" />
	</TD>
</logic:iterate>
</TR>
</logic:iterate>

</TABLE><BR>


<B>●追加項目</B>
<TABLE cellpadding="1" cellspacing="1" border="1">
<TR>
	<TH>項目</TH>
	<TH>期日</TH>
	<TH>稼働時間</TH>
	<TH>項目追加ﾕｰｻﾞ</TH>
</TR>

<logic:iterate id="workItemList" name="workItemList" indexId="index" scope="session">
<logic:notEqual name="workItemList" property="addStaffId" value="0">
<TR>
	<TD><bean:write name="workItemList" property="name" /></TD>
	<TD>
		<html:select name="workItemList" property="deadlineY" indexed="true">
			<html:options name="systemCalendar" property="systemYear" labelProperty="systemYear" labelName="systemCalendar" />
		</html:select>年
		<html:select name="workItemList" property="deadlineM" indexed="true">
			<html:options name="systemCalendar" property="systemMonth" labelProperty="systemMonth" labelName="systemCalendar" />
		</html:select>月
		<html:select name="workItemList" property="deadlineD" indexed="true">
			<html:options name="systemCalendar" property="systemDate" labelProperty="systemDate" labelName="systemCalendar" />
		</html:select>日
	</TD>
	<logic:iterate id="weeklyReportWorkItem" name="weeklyReportWorkItem" offset="index" length="1" scope="session">
		<TD ALIGN="right"><bean:write name="weeklyReportWorkItem" property="workingHours" /> h</TD>
		<html:hidden name="weeklyReportWorkItem" property="workingHours" indexed="true" />
	</logic:iterate>
	<TD>
		<bean:define id="addStaffId" name="workItemList" property="addStaffId" type="java.lang.Integer" />
		<logic:iterate id="list" name="allStaffList">
			<logic:equal name="list" property="staffId" value="<%=addStaffId.toString()%>">
				<bean:write name="list" property="name" />
			</logic:equal>
		</logic:iterate>
	</TD>
</TR>
</logic:notEqual>
</logic:iterate>

</TABLE><BR>
<html:errors property="workingHours1" />

<TABLE border="0">
<TR>
	<TH ALIGN="left">●問題点</TH>
</TR>
<TR>
	<TD><html:textarea property="problem" cols="70" rows="10" /></TD>
</TR>
</TABLE><BR>


<TABLE border="0">
<TR>
	<TH ALIGN="left">●感想</TH>
</TR>
<TR>
	<TD><html:textarea property="comment" cols="70" rows="10" /></TD>
</TR>
</TABLE>
<BR><BR>


<TABLE border="0">
<TR>
	<TD>
		<html:submit property="confirm" value="確定" />
	</TD>
</TR>
</TABLE>
</html:form>
<BR>
<H5><html:link forward="site_top" target="_parent">TOPに戻る</html:link></H5>
</BODY>
</html:html>
